package com.cans.lightning.business.lowcode.service.api;

import com.cans.lightning.base.service.api.IBaseService;
import com.cans.lightning.business.lowcode.dto.AppFormDto;
import com.cans.lightning.business.lowcode.dto.AppTableFieldDto;
import com.cans.lightning.business.lowcode.entity.AppForm;
import com.cans.lightning.business.lowcode.manager.form.bean.AppFormBean;

import java.util.List;
import java.util.concurrent.ExecutionException;


/**
 * 应用信息
 *
 * @author shencan
 * @date 2020/6/14 20:39
 */
public interface IAppFormDefinitionService extends IBaseService<AppForm, AppFormDto, String> {

    List<AppFormDto> getByAppId(String appId);

    void saveToDb(AppFormDto appFormDto);

    AppFormDto getInfo(String id);

    String getNextFieldIndex(String formId);

    AppFormBean formBeanDesign(String id);

    void saveToDb(AppFormBean appFormBean) throws ExecutionException;

    AppFormBean getFormBean(String formId);

    void mergeBaseInfo(AppFormBean appFormBean) throws ExecutionException;

    void removeEdit(String formId);

    AppTableFieldDto addField(AppTableFieldDto tableFieldDto) throws ExecutionException;
}
